<h3>
    <div class='taskTitle state-<?php echo $node['state'] ?>'>
        <?php echo $node['name'] ?>
    </div>
</h3>
<style>
    #nodeTabs a{
        font-size: 10px;
    }
    .tabs {
        border: solid 2px #fff;
    }
    .tabs-selected {
        border: solid 2px #9aa;
    }
</style>
<script>
    $('document').ready(function() {
        $('#nodeTabs').tabs({
            selected:<?php echo sfContext::getInstance()->getRequest()->getCookie('task-tab',0); ?>
        });
        $('#nodeTabs').bind(
            'tabsselect',
            function(event,ui) {
                $.cookie('task-tab', ui.index,{path:'/'});
            }
        );
    });//, domain: 'jquery.com', secure: true
</script>

<div id='nodeContent' class='tabs' taskId='<?php echo $node['id'] ?>'>
    <div id='nodeTabs'>
        <ul>
            <li><a href="#task-state">State</a></li>
            <li><a href="#task-description">Description</a></li>
            <li><a href="#task-how-to-show">How to Show</a></li>
            <li><a href="#task-technical-aspects">Technical Aspects</a></li>
            <li><a href="#task-related-tests">Related Tests (<?php echo $node['count_test'] ?>)</a></li>
            <li><a href="<?php echo url_for('task/showHistory') ?>/id/<?php echo $node['id'] ?>">History</a></li>
        </ul>
        <div id='task-state' class='task-long-text-tab'>
            <span class='text' id='state<?php echo $node['id']; ?>'>
                <?php if(!$node['has_children']): ?>
                <a href='javascript:void(0)' onclick="tasks.task.showEditState(<?php echo $node['id'] ?>);">edit</a>
                <?php endif; ?>
                <br/>
                <h3>State</h3>
                <span class='state-<?php echo $node['state'] ?>'><?php echo $node['state'] ?></span>
                <h3>Tests Result</h3>
                <span class='test-<?php echo $node['tests_result'] ?>'><?php echo $node['tests_result']; ?></span>
                <h3>Estimated Points</h3>
                <?php echo $node['estimated']; ?>
            </span>
        </div>
        <div id='task-description' class='task-long-text-tab'>
            <span class='text' id='description<?php echo $node['id']; ?>'>
                <a href='javascript:void(0)' onclick="tasks.task.showEditDescription(<?php echo $node['id'] ?>);">edit</a>
                <br/>
                <?php echo nl2br($node['description']); ?>
            </span>
        </div>
        <div id='task-how-to-show' class='task-long-text-tab'>
            <span class='text' id='howToShow<?php echo $node['id']; ?>'>
                <a href='javascript:void(0)' onclick="tasks.task.showEditHowToShow(<?php echo $node['id'] ?>);">edit</a>
                <br/>
                <?php echo nl2br($node['how_to_show']); ?>
            </span>
        </div>
        <div id='task-technical-aspects' class='task-long-text-tab'>
            <span class='text' id='technicalAspects<?php echo $node['id']; ?>'>
                <a href='javascript:void(0)' onclick="tasks.task.showEditTechnicalAspects(<?php echo $node['id'] ?>);">edit</a>
                <br/>
                <?php echo nl2br($node['technical_aspects']); ?>
            </span>
        </div>
        <div id='task-related-tests' class='task-long-text-tab'>
            <a href='javascript:void(0)' onclick='tasks.task.showRelateTests(<?php echo $node['id'] ?>);'>edit</a>
            <br/>
            <?php include_component('task','relatedTests', array('node'=>$node)) ?>
        </div>
    </div>
</div>